﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;

namespace PeisongWeb.controls
{
    public partial class header : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CustomerEntity cus= logic.customer.getById(logic.customer.userId);
                lbl_UserName.InnerText = cus.Username;
                lbl_CompanyName.InnerText = logic.company.getById(cus.CompanyId).Company;
                lbl_Date.InnerText = DateTime.Now.ToShortDateString() + "　星期" + DateTime.Now.ToString("ddd", new System.Globalization.CultureInfo("zh-cn"));
            }
        }
        protected void lbt_logout_Click(object sender, EventArgs e)
        {
            logic.customer.logout();
            //Response.Redirect("login.html");
        }
    }
}